<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>{$appConfigs.title}</title>

    <link rel="stylesheet" type="text/css" href="{$contextPath}/pas/easyui/themes/{$page_theme | default: 'default'}/easyui.css">
    <link rel="stylesheet" type="text/css" href="{$contextPath}/pas/easyui/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="{$contextPath}/pas/style/my.css">
    <script type="text/javascript" src="{$contextPath}/pas/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="{$contextPath}/pas/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="{$contextPath}/pas/javascript/my.js"></script>
    
</head> 
<body style="width:99%;height:688px;padding:0px;">
	<div class="easyui-layout" style="width:100%;height:100%;padding:0px;">
		<div data-options="region:'east',split:false" style="width:15%;">
            <table id="dg" class="easyui-datagrid" style="width:100%;"
                    url="/invest/AssetsService/findAll4.do?rows=1000"
                    toolbar="#dg-toolbar" pagination="false" pageSize="15" pageList="[15,30]"
                    rownumbers="true" fitColumns="true" singleSelect="true">
                <thead>
                    <tr>
                        <th field="name" formatter="fieldFormatter('name')" style="width:98%">名称</th>
                    </tr>
                </thead>
            </table>
		</div>
		<div id="cc" data-options="region:'center',split:true">
			
		</div>
	</div>
    
    <script>
    {literal}
    field_formatters.name=function (value, row, index){
		return "<a class='easyui-linkbutton' onclick='selectAssets("+row['assets_id']+","+index+")'>"+value+'('+row['code']+')'+"</a>";
    }
    function selectAssets(assets_id, index) {
        var dt = new Date();
        dt.setMonth( dt.getMonth()- 12);
        var ds = date_formatter(dt);
        $("#cc").html('<iframe name="detail" scrolling="no" src="/invest/assets/assets_price_chart.shtml?assets_id='+assets_id+'&from_date='+ds+'" frameborder="0" style="width:99%;height:99%;"></iframe>');
    }
    {/literal}
    </script>
</body>
</html>